home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk64 / blk / macros.r < prev    next >
Text File  |  1995-03-19  |  2KB  |  61 lines

  1. /*
  2.  * Standard set of macros for Modeler requesters.  Gives them a 
  3.  * consistent look (if nothing else).
  4.  */
  5.  
  6. /* Ok/Cancel gadgets, numbers "ok" and "can"
  7.  * It's an hbox with the gadgets pressed apart with a filler.
  8.  * Also has the extended gadget data for these gadgets.
  9.  */
  10. #define OKCAN(ok,can) \
  11.     (h|(v-(v(b 0 3)(h(b 5 0)(t 2"Ok")(b 5 0))(b 0 2)):ok-)| \
  12.      (b 5 0) f (b 5 0) \
  13.       |(v-(v(b 0 3)(h (b 5 0)(t 3"Cancel")(b 5 0))(b 0 2)):can-)|)
  14. #define OKCAN_EXT(ok,can) \
  15.     ok:"OK_ID""ev" can:"CAN_ID""ev"
  16.  
  17. /* An underlined title string centered in an hbox.
  18.  */
  19. #define TITLE(str)    (h f(v(t 3 str)(-1 3))f)
  20.  
  21. /* Text centered in a vbox -- for labeling larger boxes.
  22.  */
  23. #define LABEL(txt)    (v f(t txt)f)
  24.  
  25. /* String gadget with a more complex box around it.  Starting text is
  26.  * "txt", gadget number is "num."
  27.  */
  28. #define STRGAD(txt,num) \
  29.     (h|(v-(-1 2)(h(|1 2)(|1 2)(t txt):num(|1 2)(|1 2))(-1 2)-)|)
  30.  
  31. /* Scale gadgets.  The +/- buttons and scale indicator.
  32.  */
  33. #define SCALE(up,down) \
  34.     (v f \
  35.       (h f (t 3"Scale") f) \
  36.       (h (t 1"+"):up f (t 1"mm") f (t 1"-"):down) \
  37.      f)
  38. #define SCALE_EXT(up,down)    up:"SCLU_ID""v" down:"SCLD_ID""v"
  39.  
  40. /* Does the boilerplate to start and end a requester.  The boxes between
  41.  * start and end will lie within a vbox with a nice border around it.
  42.  */
  43. #define START_REQ    (h | (v - (h (b 8 0) (v (b 0 8)
  44. #define END_REQ        (b 0 8))(b 8 0)) - ) | )
  45.  
  46. /* Layer gadgets centered in an hbox.
  47.  * Always numbered 10-17.
  48.  */
  49. #define LAYGAD \
  50.     (h f (v f(t 1"Layer")f) (b 5 0) | \
  51.      (v - (b 0 3) (h (b 2 0) \
  52.       (t"1"):10(b 2 0)(t"2"):11(b 2 0)(t"3"):12(b 2 0)(t"4"):13(b 2 0) \
  53.       (t"5"):14(b 2 0)(t"6"):15(b 2 0)(t"7"):16(b 2 0)(t"8"):17(b 2 0) \
  54.      ) (b 0 2) -) \
  55.     | f)
  56. #define LAYGAD_EXT \
  57.     10:"BUF_ID""ti"   11:"BUF_ID+1""ti"\
  58.     12:"BUF_ID+2""ti" 13:"BUF_ID+3""ti"\
  59.     14:"BUF_ID+4""ti" 15:"BUF_ID+5""ti"\
  60.     16:"BUF_ID+6""ti" 17:"BUF_ID+7""ti"
  61.